﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.UPMS.Application.ViewModels
{
    /// <summary>
    /// 功能权限视图模型
    /// </summary>
    public class OutRoleFunctionPermissionCategory
    {
        /// <summary>
        /// 提供者名称
        /// </summary>
        public string Provider { get; set; } = string.Empty;

        /// <summary>
        /// 功能点分组
        /// </summary>
        public string Category { get; set; } = string.Empty;

        /// <summary>
        /// 功能点列表
        /// </summary>
        public IList<RoleFunctionPermissionItem> FunctionPermissions { get; set; } = new List<RoleFunctionPermissionItem>();
    }

    /// <summary>
    /// 功能点
    /// </summary>
    public class RoleFunctionPermissionItem
    {
        /// <summary>
        /// 功能点标识
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 功能点描述
        /// </summary>
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 是否已授权
        /// </summary>
        public bool IsGranted { get; set; } = false;
    }
}